home *** CD-ROM | disk | FTP | other *** search
-
-
-
- UUUUSSSSOOOOPPPPEEEENNNNPPPPOOOOLLLLLLLLSSSSEEEEMMMMAAAA((((3333PPPP)))) UUUUSSSSOOOOPPPPEEEENNNNPPPPOOOOLLLLLLLLSSSSEEEEMMMMAAAA((((3333PPPP))))
-
-
-
- NNNNAAAAMMMMEEEE
- usopenpollsema - attach a file descriptor to a pollable semaphore
-
- CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<uuuulllloooocccckkkkssss....hhhh>>>>
-
- iiiinnnntttt uuuussssooooppppeeeennnnppppoooollllllllsssseeeemmmmaaaa ((((uuuusssseeeemmmmaaaa____tttt ****sssseeeemmmmaaaa,,,, mmmmooooddddeeee____tttt aaaacccccccc))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _u_s_o_p_e_n_p_o_l_l_s_e_m_a attaches a file descriptor to a pollable semaphore. The
- returned file descriptor is used when calling _p_o_l_l(2) or _s_e_l_e_c_t(2) to
- acquire the semaphore after an unsuccessful _u_s_p_s_e_m_a(3P).
-
- If the caller is the first process to call _u_s_o_p_e_n_p_o_l_l_s_e_m_a on _s_e_m_a then a
- new semaphore device is allocated (see _u_s_e_m_a(7M)). The user and group id
- of the semaphore device take on the effective user/group id of the
- caller. The access mode is set to _a_c_c(see _c_h_m_o_d(2)). Calls to
- _u_s_o_p_e_n_p_o_l_l_s_e_m_a on the same semaphore by other processes simply attach to
- the previously allocated device. They must pass standard Unix file
- permission tests to be allowed to attach.
-
- All processes sharing a pollable semaphore, related and unrelated alike,
- must call _u_s_o_p_e_n_p_o_l_l_s_e_m_a before performing any semaphore operation on
- _s_e_m_a.
-
- Forked children must perform their own _u_s_o_p_e_n_p_o_l_l_s_e_m_a, as the file
- descriptor inherited from the parent through the _f_o_r_k(2) will not be
- usable.
-
- A process requires the file descriptor to call _u_s_v_s_e_m_a even if it never
- calls _u_s_p_s_e_m_a.
-
- _u_s_o_p_e_n_p_o_l_l_s_e_m_a will fail if one or more of the following are true:
-
- [EACCES] The caller does not have the required permission to open
- one or both of the two semaphore device files, ////ddddeeeevvvv////uuuusssseeeemmmmaaaa
- and ////ddddeeeevvvv////uuuusssseeeemmmmaaaacccclllloooonnnneeee.
-
- [EACCES] The caller is attempting to attach to a previously
- allocated semaphore device and does not have the requisite
- permissions.
-
- [ENOSPC] There are no more selectable semaphores available in the
- system. This is configurable up to 255. See
- ////vvvvaaaarrrr////ssssyyyyssssggggeeeennnn////mmmmaaaasssstttteeeerrrr....dddd////uuuusssseeeemmmmaaaa.
-
- [EMFILE] The system imposed limit for open file descriptors per
- process {_O_P_E_N__M_A_X} has already been reached.
-
- [ENFILE] The system file table has exceeded {_N_F_I_L_E__M_A_X} concurrently
- open files.
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- UUUUSSSSOOOOPPPPEEEENNNNPPPPOOOOLLLLLLLLSSSSEEEEMMMMAAAA((((3333PPPP)))) UUUUSSSSOOOOPPPPEEEENNNNPPPPOOOOLLLLLLLLSSSSEEEEMMMMAAAA((((3333PPPP))))
-
-
-
- [ENXIO] One or both of the two semaphore device files, ////ddddeeeevvvv////uuuusssseeeemmmmaaaa
- and ////ddddeeeevvvv////uuuusssseeeemmmmaaaacccclllloooonnnneeee, do not exist, or the device is not
- configured into the system.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- chmod(2), open(2), amalloc(3P), usclosepollsema(3P), usconfig(3P),
- uscpsema(3P), usctlsema(3P), usdumpsema(3P), usfreesema(3P),
- usfreepollsema(3P), usinit(3P), usnewsema(3P), usnewpollsema(3P),
- uspsema(3P), usvsema(3P), usema(7M).
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- Upon successful completion, a file descriptor is returned. Otherwise, a
- value of -1 is returned and _e_r_r_n_o is set to indicate the error.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-